home *** CD-ROM | disk | FTP | other *** search
/ Programming Sound Cards / Programming Sound Cards.iso / sound_00 / powdemo1.bas < prev    next >
BASIC Source File  |  1995-01-01  |  7KB  |  185 lines

  1. $string 32
  2. $link "pow.pbl"
  3. $include "pow.inc"
  4.  
  5.  
  6. cls:print
  7. print "POW! Library for PowerBASIC 3.0
  8. print "(C) Copyright 1994 by Tim Gerchmez"
  9. print:print "Demo Program #1":print"---------------":print
  10.  
  11. if sbfmdetect=0 then
  12.     print "Adlib-Compatible Card Required.":end
  13. end if
  14.  
  15. print "This program demonstrates the SBFMPLAY routine, which plays music contained in"
  16. print "a string (in the foreground).  You create/transpose the music yourself and"
  17. print "enter it directly in the PB3 IDE, without having to worry about drivers or "
  18. print "external files."
  19. print
  20. print "(1)  Aloha Oe      (2)  Born Free     (3)  Brahm's Lullaby    (4)   Edelweiss"
  21. print "(5)  Endless Love  (6)  Greensleeves  (7)  Hey Jude           (8)   If       "
  22. print "(9)  Let it be Me  (10) Memory        (11) Minuet             (12)  Puff"
  23. print "(13) Clowns        (14) Remember      (15) Tonight            (16)  Yesterday"
  24. print:print "Press any key to halt a selection while it's playing."
  25. print:line input "Enter Selection Number [ENTER alone quits]: ";s$
  26. if val(s$)=0 then print:end
  27. if val(s$)<1 or val(s$)>16 then run
  28. on val(s$) gosub aloha,born,lullaby,edel,endless,green,heyjude,ifx,beme,memory,minuet,puff,clowns,remember,tonight,yesterday
  29. run
  30.  
  31.  
  32.  
  33. 'Let it be me
  34.  
  35. beme:
  36.  
  37. bar1$="p7n7n2w4h3r.a a a h0o6x4c r.o5w2b-w4a g h8r.f g a x4hca r.w2g w4f e hir.d f g x4h3f r.c r.hbr.f h0f e h3x5f r.r.r."
  38. bar2$="hio6r.d d d x9o5hco6c r.o5a r.hir.o6d e d x9o5h3o6c r.o5a r.r.hbb-o6c d x9o5h3o6c r.o5f r.hir.f g a x8h5a r.r.r."
  39. sbfmplay bar1$+bar1$+bar2$+bar1$
  40. return
  41.  
  42. 'Try to Remember
  43. remember:
  44.  
  45. bar1$="h3n3n8w6a a a a g f hbo4b-b-b-h0b-o5c d "
  46. bar2$="w6h3c r.o4a o5f r.c hbd r.o4b-o5h0g d r."
  47. bar3$="w6o6hcc c c h8c o5b-a hbb-b-b-h0b-a g h3a a a hia g f hbg r.d h0e c r."
  48. bar4$="w6h3a f w4a f hia f a f a f w8h3a f r.r.r."
  49. sbfmplay bar1$+bar2$+bar1$+bar2$+bar3$+bar1$+bar4$
  50. return
  51.  
  52. 'Send in the clowns
  53. clowns:
  54. bar1$="w8n1n8i2o4b-o5c f h3f r.r.r.hir.o4b-o5c f h3f r.r.r."
  55. bar2$="g a f g a a a r.r.r.a a o6c o5c hid r.r.r.r."
  56. bar3$="d f o4b-o5h0c r.r.r.r.d f e h3f r.r.r.r.r."
  57. sbfmplay bar1$+bar2$+bar3$
  58. return
  59.  
  60. 'Memory
  61. memory:
  62.  
  63. bar1$="v4i1v5i1v6i1v1i2t0s1w6n8h0o6c r.c r.r.r.o5b o6c d c o5a hco6c r.r.c r.r.r."
  64. bar2$="o5b o6c d c o5g h3a r.r.a r.r.r.f g a g f h9e r.r.r.r.r.r."
  65. bar3$="o5e g h8g r.r.d r.e f r.g a r.b hco6c o5b a g r.r.r.r."
  66. bar4$="o5e c h4g r.r.g r.r.r.r.o4a a b o5c h0c r.r.r.r.r."
  67. sbfmplay bar1$+bar2$+bar3$+bar4$
  68. return
  69.  
  70. 'Greensleeves
  71. green:
  72. a$="p6n7d h8f r.g a b-a h0g r.e c d e h8f r.d d c#d h5e r.c#o4a r."
  73. b$=p$+"o5d h8f r.g a b-a h0g r.e c d e h8f e d h5c#o4b o5c#h8d r.r.r.r."
  74. c$="h3o6c r.c c o5b a h0g r.e c d e h8f r.d d c#d h5e r.c#o4a r.r."
  75. d$="o5h3o6c r.c c o5b a h0g r.e c d e h8f e d h5c#o4b o5c#h8d r.r.r.r."
  76. sbfmplay a$+b$+c$+d$
  77. return
  78.  
  79. 'Minuet
  80. minuet:
  81. bar1$="t3o4w4h0g r.c d e f h0g r.c r.c r.h3a r.f g a b h0o5c r.o4c r.c r."
  82. bar2$="h4f r.g f e d h0e r.f e d c ":bar3$="o3b r.o4c d e c h4d r.r.r.r."
  83. bar4$="h4d r.e d c o3b o4h0c r.r.r.r."
  84. sbfmplay bar1$+bar2$+bar3$+bar1$+bar2$+bar4$
  85. return
  86.  
  87. 'Ahoha Oe
  88. Aloha:
  89. bar1$="n7t0i1p5w6g h3a r.o6c r.f r.r.o5a h0g r.o6c r.e r.r.c "
  90. bar2$="o5h4b r2a b o6c d d f f o5h0o6e r.c r.o5g r.r."
  91. bar3$="o5h4b r.o6c r.e d o5b g h0o6c r.r.r."
  92. sbfmplay bar1$+bar2$+bar1$+bar3$
  93. return
  94.  
  95. 'Puff the Magic Dragon
  96. puff:
  97. bar1$="n8s0t3h3w7f r3w4f w7f f hce r.c r.hid r.f f h3c r.r.c "
  98. bar2$="o4hib-b-o5c o4b-h3a o5c f w4f f "
  99. bar3$="w7h4f d e f h0g r.r.r."
  100. bar4$="w7h4d f h0e g h3f r.r.r."
  101. sbfmplay bar1$+bar2$+bar3$+bar1$+bar2$+bar4$
  102. return
  103.  
  104.  
  105. 'We've got tonight
  106. tonight:
  107. bar1$="p6s1n8o5b a g h4d r.rh1.r.r.b a g h0d d r.r.h1r.r."
  108. bar2$="b o6d o5b h4o6d r.rh0.r.r.e d c o5h4o6d r.r.o5h1o6r.r."
  109. bar3$="o5b o6d o5b h4o6d r.r.o5w2b a g w5r.r.h0r.r.b a g h4g r.r.r.r.r."
  110. sbfmplay bar1$+bar2$+bar1$+bar3$
  111. return
  112.  
  113. 'Born free
  114. born:
  115. bar1$="p4w7n3n8t2h0o5c r.r.o4g r.r.h3r.r.g a g f h0e r.r.c r.r.h3r.r.g a g f h9b r.r.g r.e "
  116. bar2$="h4f r.f f e d h0e r.r.r.r.r.r.r.r."
  117. bar3$="h4g r.g g a g h4b r.r.r.r.r.r.r.r."
  118. bar4$="o5h8d r.r.o4a r.r.r.r.a b a g hce r.r.o5c r.r.r.r.c d o4a o5c h3d r.c d r.c h1d r.c d r.c h4d r.r.r.r.r.r.r.r."
  119. bar5$="h8o5c r.r.c r.r.o4h0o5c r.r.r.r.r.r.r.r."
  120. sbfmplay bar1$+bar2$+bar1$+bar3$+bar4$+bar1$+bar5$
  121. return
  122.  
  123. 'Edelweiss
  124. edel:
  125. bar1$="i1n1h0e r.g h4o6d r.r.o5h0o6c r.o5g h3f r.r.h0e r."
  126. bar2$="e hce f g h8a r.r.h4g r.r."
  127. bar3$="g h4g a b h0o6c r.r.o5h0o6c r.r."
  128. bar4$="o5h4o6d o5g g b a g h0e r.g o6c r.r.o5h3a r.o6c o5h1o6d r.c o5h4b r.r.g r.r."
  129. bar5$="h0e r.g hbo6d r.r.o5h3o6c r.o5g haf r.r.h0e r."
  130. sbfmplay bar1$+bar2$+bar1$+bar3$+bar4$+bar5$+bar3$
  131. return
  132.  
  133. heyjude:
  134. bar1$="t1i1v6i2v1n5n9p6o6w5r.c r.o5h3a r.r.r.r.a o6c d o5h0g r.r.r.r."
  135. bar2$="g a hbb-r.o6f r.o5h0o6r.f e c o5h3o6d w3c o5b-w5a r.r.r.r."
  136. bar3$="o6c o5hio6d d r.d w3g f r.w5e w3f d r.w5o5h3o6c r.r.r."
  137. bar4$="o5f g a h0o6d c r.r.c o5b-a r.r.h3e f r.r.r."
  138. bar5$="r.r.o5f h3o6f e-d c c o5b-hio6d r.f d r.f r.o5hbb-o6r."
  139. bar6$="o6f r.d c o5b-h0o6c r.r.d c r.o5b-r.h3a g f r.r.r.r."
  140. bar7$="o5f o6c d o5h3o6e-r.e-r.e f o5h0o6g r.g r.r.r.r.r.r."
  141. ba$=bar1$+bar2$+bar3$+bar4$:bb$=bar5$+bar6$
  142. sbfmplay ba$+ba$+bb$+bb$+bar7$+ba$+"r.r.r.r."
  143. return
  144.  
  145. yesterday:
  146. bar0$="w6p5t3v4i1v5i1v6i1v1n3n8"
  147. bar1$="o4h3g w4f w6f r.r.r.r.h5r.r.a b o5w4c#w6d e f h8e r.d d r.r.r."
  148. bar2$="hir.r.d d h0c o4b-a g h3b-r.a a r.g r.h8f r.a r.h4g r.d r.hif r.h3a a r.r.r.r."
  149. bar3$="t3o4h5a r.r.r.a r.r.r.o5h8d r.e r.hif r.e d h0e r.r."
  150. bar4$="d w4c w6d r.w5r.w6o4h3a r.r.r.r.r.r."
  151. bar5$="d c r.e r.h3f r.c r.o4b-r.a r."
  152. bar6$="h8f r.a r.h4g r.d r.hif r.h3a a r.r.r.r.r.r."
  153. sbfmplay bar0$+bar1$+bar2$+bar1$+bar2$+bar3$+bar4$+bar3$+bar5$+bar1$+bar2$+bar6$
  154. return
  155.  
  156. lullaby:
  157. bar1$="t3i1p6n0o5b b h4o6d r.r.r.o5b b h4o6d r.r.r."
  158. bar2$="o5b o6d o5h4o6g r.f#r.e r.o5h1o6e r.d r."
  159. bar3$="o5a b h1o6c r.o5a r.a b h1o6c r.r.r.o5a o6c f#e d r.f#r.o5h4o6g r.r.r."
  160. bar4$="o5g g h0o6g r.r.r.e c o5h4o6d r.r.r.o5b g h1o6c r.d r.e r.o5h4o6d r.r.r."
  161. bar5$="o5g g h0o6g r.r.r.e c o5h4o6d r.r.r.o5b g h1o6c r.o5b r.a r.h4g r.r.r.r.r."
  162. sbfmplay bar1$+bar2$+bar3$+bar4$+bar5$
  163. return
  164.  
  165. ifx:
  166. bar0$="t1n1n8p9"
  167. bar1$="w3b o6c w5o5h4o6v2o4G v1o6d d d d o5h1o6v2o4F#v1o6d c o5b r.o6w2c w5o5h8v2o4F v1o6d d c o5b h0v2o4E v1o5g r.r."
  168. bar2$="g h7v2o4D#v1o6c c o5b g v2o4D v1o5h4d r.r.d v2o4D#v1o5h7e-e-g o6d v2o4F#v1o5h1a r.r."
  169. bar3$="q2v1g v2o4E v1o5h9b r.r.o6e v2o4D#v1o6f#r.r.g v2o4D v1o5h4b b a g q2h0q2a r.r.o6e v2o5F v1h8o6d r.r.o5a v2o5E v1o5h2g#r.r.o6d v2o5C v1o5hco6c r.r.o5g v2o5D v1o5h1f#r.r."
  170. bar4$="q2v1g v2o4E v1o5h9b r.r.o6e v2o4D#v1o6f#r.r.g v2o4D v1o5h4b b a g q2h0q2a r.r.o6e v2o5F v1h8o6d r.r.o5a v2o4E v1o5h2g#r.r.o6d o5hco6q2c r.d r.o5h1o6e r.f#r.o5h4o6g r.r.o5h0o6r.r.r.o5h7o6r.r.r.o5h4o6r.r.r.r.r.r."
  171. sbfmplay bar0$+bar1$+bar2$+bar1$+bar2$+bar3$+bar1$+bar2$+bar1$+bar2$+bar4$
  172. return
  173.  
  174. endless:
  175. bar0$="t1p7n5n9"
  176. bar1$="h0e r.e r.r.r."
  177. bar2$="e f g h3g r.w3f e w5g f r.h4r.r.d d d r."
  178. bar3$="h0d e r.e r.r.r."
  179. bar4$="h0d g r.e r.r.r."
  180. bar5$="h0g r.f r.e.r.r."
  181. bar6$="c h3a r.r.r.h4r.b o6c d o5h0g r.r.h4g o6d o5hco6d c r.o5b r.o6c o5h3a r.r.r.b o6c o5h4o6d c o5b a h0g r.r.r.r."
  182. bar7$="c o6c o5h3a r.r.r.h4r.b b o6c d r.o5h0o6d e w3e d c w5o5hco6r.r.r.d c o5b h3b a r.r.a o6c o5h4b r.r.o6c o5h8o6c r.r.r.o5h3o6c r.c r.o5a r.h0c r.r.r.r.r.r."
  183. sbfmplay bar0$+bar1$+bar2$+bar3$+bar5$+bar2$+bar4$+bar6$+bar7$
  184. return
  185.